Ext.define('Admin.view.attendance.AttendanceGridPanel', {
    extend: 'Ext.grid.Panel',
    xtype: 'attendanceGridPanel',
    id:'attendanceGridPanel',
    	
    requires: [
    	//'Ext.grid.column.RowNumberer',
    	'Ext.selection.CheckboxModel'
    ],
    title: '考勤记录列表',
    //store: Ext.data.StoreManager.lookup('simpsonsStore'),
	bind: '{attendanceDataList}',
		
    columns: [
    		//{xtype: 'rownumberer',width: 40, sortable: false}
         
		 { header: 'ID',  dataIndex: 'id',hidden:true ,width: 120},
         { header: 'EmployeeId',  dataIndex: 'employee.id' ,width: 120},
         { header: 'AttendanceEvent', dataIndex: 'attendanceEvent', flex: 1 ,sortable: false},
		 { header: 'time', dataIndex: 'time' ,sortable: true ,width: 180 ,renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s')},
		 { header: 'TotalAbsence', dataIndex: 'totalAbsence', flex: 1 ,sortable: false},
		 { header: 'TotalOvertime', dataIndex: 'totalOvertime', flex: 1 ,sortable: false},
		 { header: 'TotalLeave', dataIndex: 'totalLeave', flex: 1 ,sortable: false},
		 { header: 'TotalVacation', dataIndex: 'totalVacation', flex: 1 ,sortable: false},
		 { header: 'Totalscore', dataIndex: 'totalscore', flex: 1 ,sortable: false}

    ],
    columnLines: true,
    	
	bbar: {
	    xtype: 'pagingtoolbar',//注意以后MVVM中使用新写法,不要使用Ext.create()
        //store: Ext.data.StoreManager.lookup('simpsonsStore'),
        bind: '{attendanceDataList}',
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "No topics to display"
    }
});